package com.designpatterns.observerpattern;

import java.util.Objects;
import java.util.Observable;
import java.util.Observer;

/**
 * 观察者一
 */
public class TaoBaoObserver implements Observer{
    public void update(Observable o, Object product) {
        String newProduct = Objects.toString(product);
        System.out.println("新增了产品："+newProduct+" 同步到京东商城");
    }
}
